﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Photo Viewer</title>
</head>
<body>
    <img alt="Image Viewer"  id="imgViewer" style="width:400px; height:400px" />
    <script type="text/javascript" language="javascript">
        function getQuerystring(key, default_) {
            if (default_ == null) default_ = "";
            key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
            var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
            var qs = regex.exec(window.location.href);
            if (qs == null)
                return default_;
            else
                return qs[1];
        }
        function ShowPhoto() {
            var id = getQuerystring("Id");
            var img = document.getElementById("imgViewer");
            img.src = "../Handler/PhotoDisplayHandler.ashx?Id=" + id;
        }
        ShowPhoto();
    </script>
</body>
</html>
